mobile_phone_number_start = "13 15 17 18 19"
telephone_number_start = "010 021 022 025 0888 0555"

while True:
    num = input("请输入电话：\n")
    if num.strip() == 'exit':
        break
    if not num:
        print("电话号码不能为空")
        continue
    num = num.strip()
    if not num.isdigit():
        print("无效电话号码")
        continue
    if num[:2] in mobile_phone_number_start and len(num) == 11:
        print("手机号码")
        continue
    if num.startswith("0"):
        if (num[:4] in telephone_number_start and len(num) == 12) or \
                (num[:3] in telephone_number_start and len(num) == 11):
            print("这是固定号码")
            continue
    if num.startswith("400") and len(num) == 10:
        print("这是一个广告号码")
        continue
    print("无法识别该号码")
